package com.baizhi.controller;

import com.baizhi.entity.CmfzLesson;
import com.baizhi.service.CmfzLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * Created by Administrator on 2019/4/10 0010.
 */
@Controller
@RequestMapping("/lesson")
public class CmfzLessonController {
    @Autowired
    private CmfzLessonService cmfzLessonService;

    @RequestMapping("/showAll")
    public @ResponseBody Map showAll(Integer page,Integer rows,Integer lessonStatus){
        Map map = cmfzLessonService.showAll(page, rows, lessonStatus);
        return map;
    }

    @RequestMapping("/add")
    public @ResponseBody Map add(CmfzLesson cmfzLesson){
        Map add = cmfzLessonService.add(cmfzLesson);
        return add;
    }

    @RequestMapping("/delete")
    public @ResponseBody Map delete(int[] ids){
        Map delete = cmfzLessonService.delete(ids);
        return delete;
    }
}
